<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    p.red {
      color: red;
      font-size: 50px;
    }

    .a {
      color: blue;
      font-size: 25px;
    }


    .a.b {
      font-size: 50px;
    }

    .b {
      font-size: 150px;
    }



    div.g {
      color: blue;
    }

    .g {
      color: pink;
    }

    .l {
      display: none;
    }

    .l.i {
      display: block;
    }
  </style>
</head>

<body>
  <!-- 只让小可爱变色红，无论是.red还是p，都让俩个变红 -->
  <div class="red">小哥哥</div>
  <p>小姐姐</p>
  <p class="red">小可爱50px</p>

  <div class="a b">交集选择器50px/150px</div>

  <div class="g">地球</div>

  <div class="l">想要显示出来</div>
  <script>
    document.querySelector('.l').classList.add('i')
  </script>
</body>

</html>